<html xmlns:th="http://www.thymeleaf.org" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
      layout:decorate="~{layout/baseLayout}">
<body>
<th:block layout:fragment="content">

    <div class="container theme-showcase" role="main">
        <form th:action="@{/application/__${applicationNumber}__/household}" th:object="${household}" method="POST">
            <input type="hidden" id="applicationNumber" th:field="*{applicationNumber}"/>
            <input type="hidden" id="databaseId" th:field="*{databaseId}"/>
            <h2>Household - General Information</h2>
            <div class="form-group">
                <label for="adults">Number of adults in household</label>
                <input class="form-control" id="adults" type="text" th:field="*{adultsInHousehold}"/>
            </div>
            <div class="form-group">
                <label for="children">Number of children in household</label>
                <input class="form-control" id="children" type="text" th:field="*{childrenInHousehold}"/>
            </div>
            <div class="form-group">
                <label for="iban">IBAN</label>
                <input class="form-control" id="iban" type="text" th:field="*{iban}"/>
            </div>
            <div class="form-group">
                <label for="bic">BIC</label>
                <input class="form-control" id="bic" type="text" th:field="*{bic}"/>
            </div>
            <h2>Household - Earning Capacity</h2>
            <div class="form-group">
                <label for="salaryFirst">Salary of first applicant</label>
                <input class="form-control" id="salaryFirst" type="text"
                       th:field="*{earningCapacity.salaryFirstApplicant}"/>
            </div>
            <div class="form-group">
                <label for="salarySecond">Salary of second applicant</label>
                <input class="form-control" id="salarySecond" type="text"
                       th:field="*{earningCapacity.salarySecondApplicant}"/>
            </div>
            <div class="form-group">
                <label for="rentalFinanced">Rental income of financed property</label>
                <input class="form-control" id="rentalFinanced" type="text"
                       th:field="*{earningCapacity.rentalIncomeFinancedProperty}"/>
            </div>
            <div class="form-group">
                <label for="rentalOther">Rental income of other properties</label>
                <input class="form-control" id="rentalOther" type="text"
                       th:field="*{earningCapacity.rentalIncomeOtherProperties}"/>
            </div>
            <div class="form-group">
                <label for="furtherIncome">Further income</label>
                <input class="form-control" id="furtherIncome" type="text" th:field="*{earningCapacity.furtherIncome}"/>
            </div>
            <div class="form-group">
                <label for="childBenefit">Child Benefit</label>
                <input class="form-control" id="childBenefit" type="text" th:field="*{earningCapacity.childBenefit}"/>
            </div>
            <div class="form-group">
                <label for="assetsBank">Assets on bank accounts</label>
                <input class="form-control" id="assetsBank" type="text"
                       th:field="*{earningCapacity.assetsOnBankAccounts}"/>
            </div>
            <div class="form-group">
                <label for="assetsOther">Other assets</label>
                <input class="form-control" id="assetsOther" type="text" th:field="*{earningCapacity.assetsOther}"/>
            </div>
            <h2>Household - Monthly Expenses</h2>
            <div class="form-group">
                <label for="healthFirst">Health insurance of first applicant</label>
                <input class="form-control" id="healthFirst" type="text"
                       th:field="*{monthlyExpenses.healthInsuranceFirstApplicant}"/>
            </div>
            <div class="form-group">
                <label for="healthSecond">Health insurance of second applicant</label>
                <input class="form-control" id="healthSecond" type="text"
                       th:field="*{monthlyExpenses.healthInsuranceSecondApplicant}"/>
            </div>
            <div class="form-group">
                <label for="remainderDebt">Other loans: Remainder of debt</label>
                <input class="form-control" id="remainderDebt" type="text"
                       th:field="*{monthlyExpenses.otherLoansRemainderOfDebt}"/>
            </div>
            <div class="form-group">
                <label for="monthlyLoanPayment">Other loans: monthly Repayments</label>
                <input class="form-control" id="monthlyLoanPayment" type="text"
                       th:field="*{monthlyExpenses.otherLoansMonthlyRepayments}"/>
            </div>
            <div class="form-group">
                <label for="costOfLiving">Cost Of Living</label>
                <input class="form-control" id="costOfLiving" type="text" th:field="*{monthlyExpenses.costOfLiving}"/>
            </div>
            <div class="form-group">
                <label for="rent">Rent</label>
                <input class="form-control" id="rent" type="text" th:field="*{monthlyExpenses.rent}"/>
            </div>

            <div class="form-group">
                <div class="checkbox">
                    <label>
                        <input id="rentNotApplicable" type="checkbox"
                               th:field="*{monthlyExpenses.rentNotApplicableInFuture}"/>
                        Rent not applicable in the future
                    </label>
                </div>
            </div>

            <button type="submit" class="btn btn-primary">Save</button>

        </form>
    </div>
</th:block>
</body>
</html>